In a consumer-producer distributed model of computing, consumers request data from producers and perform computing work on the data received from the producers, thereby transforming the data. An example of a consumer-producer model is a database system, where database servers are consumers and storage devices are producers of data stored on the storage devices. To compute rows to return for a query, a database server requests from storage devices data blocks containing rows. Once a database server receives the requested data blocks, the database server performs computing work on the data blocks, which may include filtering rows based on one or more criteria specified in the query.
In a variant of the consumer-producer distributed model, at least some of the computing work performed by a consumer on data provided by the producer is commutable between the consumer and producer, that is, either the producer as well as the consumer can perform the computing work on the data. In the database system in the current illustration, even though the database server is configured to filter rows stored in data blocks, the database server requests the storage device to provide data blocks that contain already filtered rows. Described herein are techniques for improving performance of systems where the consumers and producers can perform commutable work.